#ifndef FRMNETSETTING_H
#define FRMNETSETTING_H

#include <QWidget>
#include <QSharedPointer>
#include <functional>

#include "tcp/tcphelper.h"

namespace Ui {
class frmnetsetting;
}

class frmnetsetting : public QWidget
{
    Q_OBJECT

public:
    explicit frmnetsetting(QWidget *parent = 0);
    ~frmnetsetting();

    //连接控制器
    void connectToController();

protected:
    void closeEvent(QCloseEvent *event);

private slots:
    void on_btNetConnect_clicked();

    void on_btNetDisconnect_clicked();

    void onHandleConnect(int conRes);

    void onHandleConnect0(int conRes);

    void onConnectError(QAbstractSocket::SocketError);

    void onConnectError0(QAbstractSocket::SocketError);

    void onState(QAbstractSocket::SocketState);
    void onState0(QAbstractSocket::SocketState);

signals:
    void cancelConn();

    void cancelConn0();

private:
    Ui::frmnetsetting *ui;

    void initController();
};

#endif // FRMNETSETTING_H
